<extend name="Public/base"/>

<block name="body">
	<div class="main-title cf">
		<h2><if condition="$_GET['_action'] eq 'add'">新增<else/>编辑</if>广告位</h2>
	</div>
	<!-- 表单 -->
	<form id="form" action="{:addons_url('Advertising://Advertising/update')}" method="post" class="form-horizontal">
		<!-- 基础文档模型 -->
		<div id="tab1" class="tab-pane in tab1">
            <div class="form-item cf">
                <label class="item-label">位置标识<span class="check-tips">（<span style="color: red">英文</span>，请输入广告显示的标识，调用的时候参数）</span></label>
                <div class="controls">
                    <input type="text" class="text input-large" name="pos" value="{$info.pos}">
                </div>
            </div>
			<div class="form-item cf">
				<label class="item-label">位置名称<span class="check-tips">（请输入广告显示的位置）</span></label>
				<div class="controls">
					<input type="text" class="text input-large" name="title" value="{$info.title}">
				</div>
			</div>
			<div class="form-item cf">
				<label class="item-label">广告类型<span class="check-tips">（请选择广告类型，默认为单图）</span></label>
				<div class="controls">
		            <label class="radio"><input type="radio" value="1" <eq name="info['type']" value="1">checked</eq> <if condition="$_GET['_action'] eq 'add'">checked</if> name="type">单图</label>
		            <label class="radio"><input type="radio" value="2" <eq name="info['type']" value="2">checked</eq> name="type">多图</label>
		            <label class="radio"><input type="radio" value="3" <eq name="info['type']" value="3">checked</eq> name="type">文字</label>
		            <label class="radio"><input type="radio" value="4" <eq name="info['type']" value="4">checked</eq> name="type">代码</label>
				</div>
			</div>
			<div class="form-item cf">
				<label class="item-label">广告位宽度<span class="check-tips">（广告在前端展示的宽度）</span></label>
				<div class="controls">
					<input type="text" class="text input-large" name="width" value="{$info.width}">
				</div>
			</div>
			<div class="form-item cf">
				<label class="item-label">广告位高度<span class="check-tips">（广告在前端展示的高度）</span></label>
				<div class="controls">
					<input type="text" class="text input-large" name="height" value="{$info.height}">
				</div>
			</div>
		</div>
		<input type="hidden" name="id" value="{$info.id}"/>
		<div class="form-item cf">
			<button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
			<input class="btn btn-return" type="reset" value="重置" />
		</div>
	</form>
</block>

<block name="script">
<script type="text/javascript">
$(function(){
	$('#submit').click(function(){
		$('#form').submit();
	});
});
</script>
</block>